package de.backtomedieval.research;

import de.backtomedieval.R;
import de.backtomedieval.main.Game;
import de.backtomedieval.units.Archer;
import de.backtomedieval.units.Ballista;
import de.backtomedieval.units.Halberdier;
import de.backtomedieval.units.Hoplit;
import de.backtomedieval.units.Spearman;

public class Fire_Arrows extends AbstractResearch {

	private static int baseResearchPoints = 600;
	
	
	public Fire_Arrows() {
		this.setBaseResearchPoints(baseResearchPoints);
	}
	
	@Override
	public String getName() {
		return Game.getString(R.string.research_fire_arrows);
	}
	
	protected void onLevelUp(Technology technology) {
		technology.setArcherAttackBonus(calculateNewTechnologyPoints(Archer.getBaseAttack(), technology.getArcherAttackBonus(),getLevel(),10));
		technology.setBallistaAttackBonus(calculateNewTechnologyPoints(Ballista.getBaseAttack(), technology.getBallistaAttackBonus(),getLevel(),10));
	}

	@Override
	public String getResearchInfo(int level) {
		String info="";
		info += Game.getString(R.string.unit_archer) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(Archer.getBaseAttack(),level,10)+"<br>";
		info += Game.getString(R.string.unit_ballista) + ": " + Game.getString(R.string.attack) + " +" + calculateTechnologyPointsOfLevel(Ballista.getBaseAttack(),level,10);
		return info;
	}

}
